package com.mohammad.fun.dtpkrisgethin;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.View;

public class MainActivity extends Activity {
	
	Intent intent;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		//Getting the URL to work
				String video_path = "http://www.youtube.com/watch?v=7iZcGBrun5Y";
		        Uri uri = Uri.parse(video_path);

		        // With this line the youtube application, if installed, will launch immediately.
		        // Without it you will be prompted with a list of the application to choose.
		        uri = Uri.parse("vnd.youtube:"  + uri.getQueryParameter("v"));

		        intent = new Intent(Intent.ACTION_VIEW, uri);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}
	
	public void btn_watchVideo (View v){
		 startActivity(intent);
	 }
	
	public void leg (View v){
		Log.d("Mohammad Button","Leg Clicked");
		
		startActivity(new Intent(this, leg.class));
	}
	public void chest (View v){
		Log.d("Mohammad Button","Chest Clicked");
		
		startActivity(new Intent(this, chest.class));
	}
	public void arm (View v){
		Log.d("Mohammad Button","Arm Clicked");
		
		startActivity(new Intent(this, arm.class));
	}
	public void shoulder (View v){
		Log.d("Mohammad Button","Shoulder Clicked");
		
		startActivity(new Intent(this, shoulder.class));
	}

}
